<?php

declare(strict_types=1);

namespace App\Request;

use Hyperf\Validation\Request\FormRequest;

class AdminUserDetailUpdateRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     */
    public function authorize(): bool
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     */
    public function rules(): array
    {
        return [
            'nickname' => 'required',
            'phone'    => 'required',
            'site'     => 'required',
            'signal'   => 'required',
            'team'     => 'required',
        ];
    }

    public function messages(): array
    {
        return [
            'nickname.required' => '昵称必填',
            'phone.required'    => '电话号码必填',
            'site.required'     => '地址必填',
            'signal.required'   => '口号必填',
            'team.required'     => '团队必填',
        ];
    }
}
